/*
 *
 * Copyright (c) 2013-2021, Alibaba Group Holding Limited;
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: TxnStream.proto

package com.aliyun.polardbx.binlog.protocol;

public interface TxnTokenOrBuilder extends
    // @@protoc_insertion_point(interface_extends:com.aliyun.polardbx.binlog.protocol.TxnToken)
    com.google.protobuf.MessageOrBuilder {

    /**
     * <code>string tso = 1;</code>
     *
     * @return The tso.
     */
    java.lang.String getTso();

    /**
     * <code>string tso = 1;</code>
     *
     * @return The bytes for tso.
     */
    com.google.protobuf.ByteString
    getTsoBytes();

    /**
     * <code>string txnId = 2;</code>
     *
     * @return The txnId.
     */
    java.lang.String getTxnId();

    /**
     * <code>string txnId = 2;</code>
     *
     * @return The bytes for txnId.
     */
    com.google.protobuf.ByteString
    getTxnIdBytes();

    /**
     * <code>string partitionId = 3;</code>
     *
     * @return The partitionId.
     */
    java.lang.String getPartitionId();

    /**
     * <code>string partitionId = 3;</code>
     *
     * @return The bytes for partitionId.
     */
    com.google.protobuf.ByteString
    getPartitionIdBytes();

    /**
     * <code>string originMergeSourceId = 4;</code>
     *
     * @return The originMergeSourceId.
     */
    java.lang.String getOriginMergeSourceId();

    /**
     * <code>string originMergeSourceId = 4;</code>
     *
     * @return The bytes for originMergeSourceId.
     */
    com.google.protobuf.ByteString
    getOriginMergeSourceIdBytes();

    /**
     * <code>.com.aliyun.polardbx.binlog.protocol.TxnType type = 5;</code>
     *
     * @return The enum numeric value on the wire for type.
     */
    int getTypeValue();

    /**
     * <code>.com.aliyun.polardbx.binlog.protocol.TxnType type = 5;</code>
     *
     * @return The type.
     */
    com.aliyun.polardbx.binlog.protocol.TxnType getType();

    /**
     * <code>bool xaTxn = 6;</code>
     *
     * @return The xaTxn.
     */
    boolean getXaTxn();

    /**
     * <pre>
     * *
     * 标识是否为Tso事务。虽然【Tso事务】和【NoTso事务】的Token都有tso字段，
     * 但是【NoTso事务】的tso是根据其前序【Tso事务】的真实tso生成的虚拟tso
     * </pre>
     *
     * <code>bool tsoTransaction = 7;</code>
     *
     * @return The tsoTransaction.
     */
    boolean getTsoTransaction();

    /**
     * <pre>
     * *
     * 该事务下的所有LogEvent的个数，注意：不是某个批次的的个数
     * </pre>
     *
     * <code>int32 txnSize = 8;</code>
     *
     * @return The txnSize.
     */
    int getTxnSize();

    /**
     * <pre>
     * *
     * dumper生成事务的begin头时使用
     * </pre>
     *
     * <code>string beginSchema = 9;</code>
     *
     * @return The beginSchema.
     */
    java.lang.String getBeginSchema();

    /**
     * <pre>
     * *
     * dumper生成事务的begin头时使用
     * </pre>
     *
     * <code>string beginSchema = 9;</code>
     *
     * @return The bytes for beginSchema.
     */
    com.google.protobuf.ByteString
    getBeginSchemaBytes();

    /**
     * <code>repeated string allParties = 10;</code>
     *
     * @return A list containing the allParties.
     */
    java.util.List<java.lang.String>
    getAllPartiesList();

    /**
     * <code>repeated string allParties = 10;</code>
     *
     * @return The count of allParties.
     */
    int getAllPartiesCount();

    /**
     * <code>repeated string allParties = 10;</code>
     *
     * @param index The index of the element to return.
     * @return The allParties at the given index.
     */
    java.lang.String getAllParties(int index);

    /**
     * <code>repeated string allParties = 10;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the allParties at the given index.
     */
    com.google.protobuf.ByteString
    getAllPartiesBytes(int index);

    /**
     * <pre>
     * *
     * 一些特殊的TxnToken，没有TxnItem的概念，此时通过payload字段传输数据
     * </pre>
     *
     * <code>bytes payload = 11;</code>
     *
     * @return The payload.
     */
    com.google.protobuf.ByteString getPayload();

    /**
     * <pre>
     * *
     * Tso事务专用
     * </pre>
     *
     * <code>int64 snapshotSeq = 12;</code>
     *
     * @return The snapshotSeq.
     */
    long getSnapshotSeq();
}
